{include file="public/header" /}



<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.ds_points}</h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>

    <form method="post" name="settingForm" id="settingForm">
        

        <table class="ds-default-table">
            <thead>
            <tr class="space">
                <th colspan="16">{$Think.lang.points_ruletip}:</th>
            </tr>
            <tr class="thead">
                <th>{$Think.lang.points_item}</th>
                <th>{$Think.lang.points_number}</th>
            </tr>
            </thead>
            <tbody>
            <tr class="hover">
                <td class="w200">{$Think.lang.points_number_reg}</td>
                <td><input id="points_reg" name="points_reg" value="{$list_setting.points_reg}" class="txt" type="text" style="width:60px;"></td>
            </tr>
            <tr class="hover">
                <td>{$Think.lang.points_number_login}</td>
                <td><input id="points_login" name="points_login" value="{$list_setting.points_login}" class="txt" type="text" style="width:60px;"></td>
            </tr>
            <tr class="hover">
                <td>{$Think.lang.points_number_comments}</td>
                <td><input id="points_comments" name="points_comments" value="{$list_setting.points_comments}" class="txt" type="text" style="width:60px;"></td>
            </tr>

            <tr class="hover">
                <td>{$Think.lang.points_invite}</td>
                <td><input id="points_invite" name="points_invite" value="{$list_setting.points_invite}" class="txt" type="text" style="width:60px;">{$Think.lang.points_invite_tips}
                </td>
            </tr>
            <tr class="hover">
                <td>{$Think.lang.points_rebate}</td>
                <td><input id="points_rebate" name="points_rebate" value="{$list_setting.points_rebate}" class="txt" type="text" style="width:35px;">% &nbsp;&nbsp;&nbsp;{$Think.lang.points_rebate_tips}
                </td>
            </tr>
            </tbody>
        </table>
        <table class="ds-default-table">
            <thead>
            <tr class="thead">
                <th colspan="2">{$Think.lang.points_number_order}</th>
            </tr>
            </thead>
            <tbody>
            <tr class="hover">
                <td class="w200">{$Think.lang.points_number_orderrate}</td>
                <td><input id="points_orderrate" name="points_orderrate" value="{$list_setting.points_orderrate}" class="txt" type="text" style="width:60px;">
                    {$Think.lang.points_number_orderrate_tip}
                </td>
            </tr>
            <tr class="hover">
                <td>{$Think.lang.points_number_ordermax}</td>
                <td><input id="points_ordermax" name="points_ordermax" value="{$list_setting.points_ordermax}" class="txt" type="text" style="width:60px;">
                    {$Think.lang.points_number_ordermax_tip}
                </td>
            </tr>


            </tbody>
            <tfoot>
            <tr class="tfoot">
                <td colspan="2"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
            </tr>
            </tfoot>
        </table>
    </form>
</div>

<script>

    $(document).ready(function(){
        $("#settingForm").validate({
            errorPlacement: function(error, element){
                error.appendTo(element.parent().parent().find('td:last'));
            },
            rules : {
                points_reg:{
                    number:true,
                    min:0
                },
                points_login :{
                    number:true,
                    min:0
                },
                points_comments :{
                    number:true,
                    min:0
                },
                points_signin :{
                    number:true,
                    min:0
                },
                points_invite :{
                    number:true,
                    min:0
                },
                points_rebate :{
                    number:true,
                    min:0
                },
                points_orderrate :{
                    number:true,
                    min:0
                },
                points_ordermax :{
                    number:true,
                    min:0
                }
            },
            messages : {
                points_reg:{
                    number:'{$Think.lang.ds_sort_number}',
                    min:'{$Think.lang.ds_min_error}0'
                },
                points_login :{
                    number:'{$Think.lang.ds_sort_number}',
                    min:'{$Think.lang.ds_min_error}0'
                },
                points_comments :{
                    number:'{$Think.lang.ds_sort_number}',
                    min:'{$Think.lang.ds_min_error}0'
                },
                points_signin :{
                    number:'{$Think.lang.ds_sort_number}',
                    min:'{$Think.lang.ds_min_error}0'
                },
                points_invite :{
                    number:'{$Think.lang.ds_sort_number}',
                    min:'{$Think.lang.ds_min_error}0'
                },
                points_rebate :{
                    number:'{$Think.lang.ds_sort_number}',
                    min:'{$Think.lang.ds_min_error}0'
                },
                points_orderrate :{
                    number:'{$Think.lang.ds_sort_number}',
                    min:'{$Think.lang.ds_min_error}0'
                },
                points_ordermax :{
                    number:'{$Think.lang.ds_sort_number}',
                    min:'{$Think.lang.ds_min_error}0'
                }
            }
        });
    });
</script>